#ifndef __QyDrawJointTool__
#define __QyDrawJointTool__

#include <QtCore/QObject>
#include <QtCore/QVector>
#include <QyGLInputController.h>
#include "QyAbstractTool.h"

class QyJointToolIndicator;

class QyDrawJointTool : public QObject, public QyGL::InputController, public QyAbstractTool {
    Q_OBJECT
public:
    explicit QyDrawJointTool( QyToolRender * render, QyGL::ViewWidget * target );
    virtual ~QyDrawJointTool();

    bool isEnabled() const { return QyGL::InputController::isEnabled(); }
    void setEnabled( bool enabled ) { QyGL::InputController::setEnabled(enabled); }

signals:
    void createJoint( QVector<QyMath::Vector> geometry, const QyMath::Vector & center );

private:
    void mousePressd( const QyGL::MouseEvent & event );
    void mouseMoved( const QyGL::MouseEvent & event );
    void mouseReleased( const QyGL::MouseEvent & event );

    QyWallToolIndicator * p_indicator;

};

#endif//__QyDrawJointTool__
